package com.fast.develop.configuration.tools.browse;

import com.fast.develop.configuration.properties.FastDevelopPropesties;
import org.springframework.boot.CommandLineRunner;

/**
 * @author 莫寅
 * @createTime 2022-06-26 03:25
 * @desc：
 */
public class BrowseCommand implements CommandLineRunner {

    private FastDevelopPropesties fastDevelopPropesties;

    public BrowseCommand(FastDevelopPropesties fastDevelopPropesties) {
        this.fastDevelopPropesties = fastDevelopPropesties;
    }

    @Override
    public void run(String... args) {
        opOpenBrowser();
    }


    private void opOpenBrowser(){
        String url = "http://127.0.0.1:8080";
        try {
            Browser.browse(url);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
